<template>
  <div class="time-line-wrap bg-white">
    <el-timeline>
        <el-timeline-item 
            color="#409EFF" 
            v-for="item in list" 
            :key="item.Id" 
            placement="top" 
            :timestamp="item.CreateTimeStr">
            {{item.OpUserName}}{{ item.Remark }}
        </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script lang="ts">
import { defineComponent,ref, } from 'vue'
import { useRoute } from 'vue-router'
import { apiContractOperationList } from '@/api/contract'

export default defineComponent({
    setup(){
        const route=useRoute()

        // 获取合同操作记录
        let list=ref([])
        const getList=async ()=>{
            let res=await apiContractOperationList({ContractId:Number(route.params.id)})
            if(res.Ret===200){
                list.value=res.Data.List
            }
        }

        getList()
        return {
            list
        }
    }
})
</script>

<style lang="scss" scoped>
.time-line-wrap{
    width: 15vw;
    padding: 20px;
    border: 1px solid #aab4cc;
    border-radius: 4px;
    height: 905px;
    overflow-y: scroll;
    &::-webkit-scrollbar{
        width: 0;
    }
}
</style>
